package com.todolist.struts2.actions;

import com.todolist.hibernate.dao.IUserDAO;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LogoutAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	
	private IUserDAO userDAO;

	public String execute() throws Exception {
		ActionContext.getContext().getSession().clear();
		return Action.SUCCESS;			
	}
	
	public IUserDAO getUserDAO() {
		return userDAO;
	}

	public void setUserDAO(IUserDAO userDAO) {
		this.userDAO = userDAO;
	}	
}
